import request from '@/utils/request'
// 获取主页轮播
const fetchbanner = (params = {} ) => {
  return request.get('/banner/list', { params })
}
// 获取所有的类别
const fetchcate = (params =  {} ) => {
  return request.get('/shop/goods/category/all', { params} )
}
// 获取列表
const fetchitems = ( params = {} ) => {
  return request.post('/shop/goods/list', ( params ))
}
// 获取详情页信息
const fetchdetail = (params ={}) => {
  return request.get('/shop/goods/detail', { params })
}
const fetchitemlist = ( params = {}) => {
  return request.post('/shop/goods/list', ( params ))
}
export {
  fetchbanner,
  fetchcate,
  fetchitems,
  fetchdetail,
  fetchitemlist
}
